Send Template Messages
AutomatR.WhatsApp.Activities.SendTemplateMessages
The "Send Template Messages" activity in AutomatR is part of the WhatsApp activities package, providing a versatile scope for executing activities related to the WhatsApp service. This activity allows the sending of multiple template messages to different recipients within a single workflow execution.
Properties
Name | Description |
---|---|
Input | |
Template Name | Specifies the name of the pre-existing approved template to be used for the messages. Required argument. |
Broadcast Name | Specifies the broadcast name. Required argument. |
Receivers | Specifies a list of objects with specific input parameters for each recipient. Each object should contain the recipient's WhatsApp number and additional template parameters. Required argument. Format: List<whatappReceiver> . |
Misc | |
Display Name | Provides a customizable name for the activity displayed in the workflow. String variables containing the desired display name. |
Optional | |
Delay | Specifies the amount of time (in seconds) to wait before executing the "Send Template Messages" activity. This can be useful for handling synchronization issues. Integer variables containing the delay duration. Example: If the amount of time is 1000 milliseconds or 1 sec, i.e., 1. |
Output | |
Response | Returns the response from the WhatsApp service. Variables of type ResultSendTemplateMessages to store the operation result. |
How to use:
- Drag and drop the "Send Template Messages" activity onto the workflow.
- Configure the properties by specifying the template name, broadcast name, and a list of receivers with WhatsApp numbers and template parameters.
- Optionally, configure the delay and customize the display name.
- Execute the workflow to send the specified template messages to the designated recipients.
Example: Consider an example where the "Send Template Messages" activity is used to send template messages to multiple recipients:
Send Template Messages:
Display Name: "Send Welcome Messages"
Template Name: "WelcomeTemplate"
Broadcast Name: "GeneralBroadcast"
Receivers: [{"WhatsAppNumber": "85264318721", "Parameters": {"Name": "John", "Product": "AutomatR"}},
{"WhatsAppNumber": "919876543210", "Parameters": {"Name": "Alice", "Product": "Automation"}}]
Response: templateMessagesResponse
In this example, the activity sends the "WelcomeTemplate" message to two recipients ("85264318721" and "919876543210") with individual parameters. The response is stored in the templateMessagesResponse
variable for further handling in the workflow.